RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideString::[] Operator (int)

Returns the character at a specified index in the string.

Pascal
operator [](const idx: Integer);
operator [](const idx: Integer);
C++
__fastcall WideChar & operator [](const int idx);
__fastcall const WideChar& operator [](const int idx) const;

The System::WideString::[] returns the character in the string at index value idx. The System::WideString::[] assumes a base index of 1. For example, given the string “Hello” and an index value of 2, the character returned would be ‘e’. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!